{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="{% static 'Dashboard/report.css' %}">
</head>
<body>
{% if sql_11 %}
<p>今日共有{{ sql_11 | length }}人流入疫情重点关注地区。具体人员如下：</p>
<table>
    <thead>
    <tr>
        <th>学工号</th>
        <th>姓名</th>
        <th>单位</th>
        <th>身体状况</th>
        <th>手机</th>
        <th>前一日所在日</th>
        <th>现今所在地</th>
    </tr>
    </thead>
    <tbody>
    {% for submit_time, username, name, faculty_name, health_condition, sj, yesterday_country, yesterday_province, yesterday_city, yesterday_district, today_country, today_province, today_city, today_district in sql_11 %}
    <tr>
        <td>{{ username }}</td>
        <td>{{ name }}</td>
        <td>{{ faculty_name }}</td>
        <td>{{ health_condition }}</td>
        <td>{{ sj }}</td>
        <td>{{ yesterday_country | default:'' }}{{ yesterday_province | default:'' }}{{ yesterday_city | default:'' }}{{ yesterday_district | default:'' }}</td>
        <td>{{ today_country | default:'' }}{{ today_province | default:'' }}{{ today_city | default:'' }}{{ today_district | default:'' }}</td>
    </tr>
    {% endfor %}
    </tbody>
</table>

{% else %}
<p>今日无人流入疫情重点关注地区</p>
{% endif %}

{% if sql_17 %}
<p>今日共有{{ sql_17| length }}人流出疫情重点关注地区。具体人员如下：</p>
<table>
    <thead>
    <tr>
        <th>学工号</th>
        <th>姓名</th>
        <th>单位</th>
        <th>身体状况</th>
        <th>手机</th>
        <th>前一日所在日</th>
        <th>现今所在地</th>
    </tr>
    </thead>
    <tbody>
    {% for submit_time, username, name, faculty_name, health_condition, sj, yesterday_country, yesterday_province, yesterday_city, yesterday_district, today_country, today_province, today_city, today_district in sql_17 %}
    <tr>
        <td>{{ username }}</td>
        <td>{{ name }}</td>
        <td>{{ faculty_name }}</td>
        <td>{{ health_condition }}</td>
        <td>{{ sj }}</td>
        <td>{{ yesterday_country | default:'' }}{{ yesterday_province | default:'' }}{{ yesterday_city | default:'' }}{{ yesterday_district | default:'' }}</td>
        <td>{{ today_country | default:'' }}{{ today_province | default:'' }}{{ today_city | default:'' }}{{ today_district | default:'' }}</td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% else %}
<p>今日无人流出疫情重点关注地区</p>
{% endif %}
</body>
</html>